﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Store.Web.Models;

namespace Store.Web.Services
{
    [ServiceContract]
    public interface IStoreService
    {
        [OperationContract]
        List<Product> GetProducts();

        [OperationContract]
        List<Product> GetHomeProducts(int number);

        [OperationContract]
        Product GetProduct(int id);

        [OperationContract]
        List<Order> GetHomeOrders(int customerId, int number);

        [OperationContract]
        List<Order> GetOrders(int customerId);

        [OperationContract]
        Order GetOrder(int id);

        [OperationContract]
        void SubmitOrder(Order command);

        [OperationContract]
        void UpdateOrder(Order command);

        [OperationContract]
        Customer GetCustomer(int id);

        [OperationContract]
        void AddCustomerAddress(int customerId, Address address);

        [OperationContract]
        void SubscribeToPush(int customerId, string url);

        [OperationContract]
        void UnsubscribeFromPush(string url);

        [OperationContract]
        int GetOrderState(int orderId);
    }
}
